package com.heima.wemedia.feign;


import com.heima.apis.channel.IChannelClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.wemedia.service.WmChannelService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequiredArgsConstructor
public class ChannelClient implements IChannelClient {


    //channel
    private final WmChannelService wmChannelService;

    /**
     * 查看所有频道
     * @return
     */
    @GetMapping("/channels")
    public ResponseResult findAll(){
        log.info("查看所有频道");

        return wmChannelService.findAll();
    }





}
